package com.ssy.lingxi.platform.manage.entity.content;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 素材库实体类
 * @author xiechenhui
 * @version 2.0.0
 * @date 2022/03/24
 */
@Data
@Entity
@Table(schema = "public", name = "man_material_library")
public class MaterialLibrary implements Serializable {

    private static final long serialVersionUID = -5623960465767881969L;

    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "material_library_seq")
    @SequenceGenerator(sequenceName = "man_material_library_seq", name = "material_library_seq", allocationSize = 1)
    private Long id;

    /**
     * 文件名称
     */
    @Column(columnDefinition = "varchar(200)")
    private String fileName;

    /**
     * 文件url
     */
    @Column(columnDefinition = "varchar(500)")
    private String fileUrl;

    /**
     * 会员id
     */
    @Column(columnDefinition = "int8")
    private Long memberId;

    /**
     * 会员角色id
     */
    @Column(columnDefinition = "int8")
    private Long memberRoleId;

    /**
     * 会员角色名称
     */
    @Column(columnDefinition = "varchar(100)")
    private String memberRoleName;

    /**
     * 文件类型 1-图片 2-视频 3-文件
     */
    private Integer fileType;

    /**
     * 上传时间
     */
    @Column(columnDefinition = "timestamp")
    private LocalDateTime uploadTime;
}
